<template>
  <div class="discover">
    <div class="nav-bar">
      <router-link to="/discover">发现音乐</router-link>
      <router-link to="/discover/toplist">排行榜</router-link>
      <router-link to="/discover/playlist">播放列表</router-link>
    </div>
    <!-- 二级路由出口 -->
    <router-view />
  </div>
</template>

<script>
export default {

}
</script>

<style scoped>
.discover {
    background: url(../assets/discover.png) no-repeat center / cover;
    /* 100vh代表高度铺满屏幕 */
    /* 记住必须给高度，不然盒子默认没有高度，那么会导致看不到内容 */
    height: 100vh;
}

.nav-bar {

  height: 30px;
  background-color: #f00;
  display: flex;
}

.nav-bar a {
  text-decoration: none;
  flex: 1;
  color:#fff;
  text-align: center;
}

.nav-bar a.router-link-exact-active {

  color: blue;
}
</style>